<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta content='True' name='HandheldFriendly' />
		<meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' />
		<meta name="viewport" content="width=device-width" />
		<title>EasyCharts</title>
		<link rel="stylesheet" type="text/css" href="stylesheet_mobile.css"/>
	</head>
	<body>
		<div id="top">
			<div id="logo" style="cursor: pointer;" onclick="window.location = '';">
				<h2>EasyCharts Mobile</h2>
			</div>
		</div>
		<form action="mobile_checklogin.php" method="post">
			<div id="content">
				<div class="formular">
					<?php
					session_start();

					// If already logged in go to overview page
					if(isset($_SESSION["valid_email"])) {
						header("Location: mobile_overview.php");
					}

					// If wronglogin the show messagebox
					if(isset($_SESSION["wronglogin"])) {
						if($_SESSION["wronglogin"] == 1) {
							echo '<div class="errorbox" id="sw" style="color: red;">Wrong email or password<br/></div><br/>';
							$_SESSION["wronglogin"] = 0;
						}
					}
					?>
					<div class="field_block">
						<div class="label">
							E-mail
						</div>
						<div class="input">
							<input type="text" name="email" id="emailinput" value="" class="textfield"/>
						</div>
					</div>
					<div class="field_block">
						<div class="label">
							Password
						</div>
						<div class="input">
							<input type="password" name="password" id="passwordinput" class="textfield"/>
						</div>
					</div>
					</br>
					<div class="field_block">
						<div class="input">
							<input type="submit" name="submit" value="Log in" id="submit"/>
							<span></span>
						</div>
					</div>
				</div>
				</br>
				</br>
			</div>
		</form>
		<div id="footer">
			Version: 1.0.0
			</br>
			Copyright © 2011 - <u><a href="http://www.microcom.dk" target="_blank">Microcom</a></u>
		</div>
	</body>
</html>